home *** CD-ROM | disk | FTP | other *** search
- /*
- * netprint.rexx
- *
- * USAGE: netprint.rexx
- *
- * netprint.rexx
- *
- * $(C): (1994, Rocco Coluccelli, Bologna)
- * $VER: netprint 1.01 (31.Jan.1995)
- */
-
- ADDRESS COMMAND
-
- MAXLINE = 80
-
- IF ~SHOW('P','OLE_DISPLAY') THEN
- RUN '>NIL: Multiview iff/piano PORTNAME OLE_DISPLAY'
-
- s1 = "Well, as you can see, this is a token-ring style network."
- s2 = "Start with connecting a printer on it."
- CALL Print(s1,s2)
- ''SAY '-m -s160 -p80' s1 s2
- ADDRESS OLE_DISPLAY "OPEN NAME iff/TokenRing.1prt"
-
- s1 = "Let's have a try to connect some computers on the same network."
- CALL Print(s1,)
- ''SAY '-m -s130 -p90' s1
- ADDRESS OLE_DISPLAY "OPEN NAME iff/TokenRing.1prt.2pc"
-
- s1 = "Now, how many modes, do you know to send a file on network for printing?"
- s2 = "One of those many, it might be printing directly from each computer."
- CALL Print(s1,s2,)
- ''SAY '-m -s130 -p100' s1
- ''SAY '-m -s140 -p80' s2
- ADDRESS OLE_DISPLAY "OPEN NAME iff/TokenRing.prt.direct"
-
- s1 = "At this point, I don't known anything about the net transfer rate."
- s2 = "My computer is busy until the printing will be finished."
- s3 = "What happen if others need the network?"
- s4 = "Miss Dossmasher?"
- CALL Print(s1 s2,)
- ''SAY '-m -s120 -p90' s1
- ''SAY '-m -s140 -p100' s2
- CALL Print(s3,s4,)
- ''SAY '-m -s120 -p100' s3 s4
- ADDRESS OLE_DISPLAY "OPEN NAME iff/TokenRing.prt.direct.busy"
-
- s1 = "Perhaps,"
- s2 = "oooooaaaa"
- s3 = "they have to wait?"
- CALL Print(s1 s3,)
- ''SAY '-f -s80 -p260' s1
- ''SAY '-f -s40 -p320' s2
- ''SAY '-f -s100 -p300' s3
-
- s1 = "Welcome back in the living world, Miss Ballsmasher."
- s2 = "Did you seen the answer dreaming"
- CALL Print(s1,s2 || '?',)
- ''SAY '-m -s120 -p130' s1
- ''SAY '-m -s140 -p100' s2
-
- EXIT 0
-
-
- /*
- * procedure to split text onto lines of MAXLINE characters length
- */
- Print: PROCEDURE EXPOSE MAXLINE
-
- DO i = 1 TO ARG()
-
- line = ARG(i)
- DO FOREVER
-
- IF LENGTH(line) <= MAXLINE THEN DO
- ECHO line
- LEAVE
- END
-
- pos = MAX(LASTPOS(' ',line,MAXLINE),POS(' ',line))
- IF pos = 0 THEN DO
- ECHO line
- LEAVE
- END
-
- ECHO LEFT(line,pos); line = SUBSTR(line,pos + 1)
- END
- END
-
- RETURN
-